<?php
class NewFriendInviteVo extends SzAbstractMySqlVo
{

    private $userId;
    private $friendId;
    private $lastLevel;
    private $inviteTime;

    /**
     * Initialize NewFriendInviteVo.
     *
     * @param $userId
     * @param $friendId
     * @param $lastLevel
     * @param $inviteTime
     * @param boolean $isInsert default false, means for now this vo is initialized not for insert process
     * @return NewFriendInviteVo
     */
    public function __construct($userId, $friendId, $lastLevel, $inviteTime, $isInsert = false) {
        $this->userId = $userId;
        $this->friendId = $friendId;
        $this->lastLevel = $lastLevel;
        $this->inviteTime = $inviteTime;

        $this->isInsert = $isInsert;
        $this->voClassName = 'NewFriendInviteVo';
        $this->ormName = 'NewFriendInvite';
    }

    /**
     * @see SzAbstractVo::toArray
     */
    public function toArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'friendId' => $this->getFriendId(),
            'lastLevel' => $this->getLastLevel(),
            'inviteTime' => $this->getInviteTime(),
        );
    }

    /**
     * @see SzAbstractVo::toEntireArray
     */
    public function toEntireArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'friendId' => $this->getFriendId(),
            'lastLevel' => $this->getLastLevel(),
            'inviteTime' => $this->getInviteTime(),
        );
    }

    /**
     * @see SzAbstractVo::toPureArray
     */
    public function toPureArray()
    {
        return array(
            $this->getUserId(),
            $this->getFriendId(),
            $this->getLastLevel(),
            $this->getInviteTime(),
        );
    }

    public function getUserId()
    {
        return $this->userId;
    }

    public function setUserId($val)
    {
        $this->saveColumnStatus(0, $this->userId);
        $this->userId = $val;
    }

    public function getFriendId()
    {
        return $this->friendId;
    }

    public function setFriendId($val)
    {
        $this->saveColumnStatus(1, $this->friendId);
        $this->friendId = $val;
    }

    public function getLastLevel()
    {
        return $this->lastLevel;
    }

    public function setLastLevel($val)
    {
        $this->saveColumnStatus(2, $this->lastLevel);
        $this->lastLevel = $val;
    }

    public function getInviteTime()
    {
        return $this->inviteTime;
    }

    public function setInviteTime($val)
    {
        $this->saveColumnStatus(3, $this->inviteTime);
        $this->inviteTime = $val;
    }

}